<template>
  <div >
    <router-view></router-view>
    <tabbar>
        <tabbar-item :selected="selected" link="/class">
          <i slot="icon" class="iconfont icon-course"></i>
          <span slot="label">课程</span>
        </tabbar-item>
        <tabbar-item :selected="!selected" :show-dot="hasMsg" link="/chart">
          <i slot="icon" class="iconfont icon-chart"></i>
          <span slot="label">消息</span>
        </tabbar-item>
    </tabbar>
  </div>
</template>
<script>
import { Tabbar, TabbarItem } from 'vux'
  export default {
    data() {
      return {
        hasMsg:true,
        selected:true
      }
    },
    methods: {
      
    },
    mounted(){
        this.$router.history.current.path=='/class'?this.selected=true:this.selected=false;
    },
    components: {
    Tabbar,
    TabbarItem,
    }
  }
</script>
<style>
  .weui-tabbar{background:#fff!important;}
</style>